<html>
<head><meta charset="utf-8"><title>Should clippy lints be fixed in a separate PR? · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Should.20clippy.20lints.20be.20fixed.20in.20a.20separate.20PR.3F.html">Should clippy lints be fixed in a separate PR?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="177440885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Should%20clippy%20lints%20be%20fixed%20in%20a%20separate%20PR%3F/near/177440885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Avi Dessauer <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Should.20clippy.20lints.20be.20fixed.20in.20a.20separate.20PR.3F.html#177440885">(Oct 06 2019 at 02:30)</a>:</h4>
<p>If I see clippy/rust-analyzer lints while working should I fix them in the PR I'm working on or a separate one?<br>
In this case the lint is <code>Shorthand struct initialization</code>.</p>



<a name="177441076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Should%20clippy%20lints%20be%20fixed%20in%20a%20separate%20PR%3F/near/177441076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Should.20clippy.20lints.20be.20fixed.20in.20a.20separate.20PR.3F.html#177441076">(Oct 06 2019 at 02:37)</a>:</h4>
<p>Depends. On code you've just modified or introduced? Or do the lints occur on the unmodified code?</p>



<a name="177441078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Should%20clippy%20lints%20be%20fixed%20in%20a%20separate%20PR%3F/near/177441078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Should.20clippy.20lints.20be.20fixed.20in.20a.20separate.20PR.3F.html#177441078">(Oct 06 2019 at 02:37)</a>:</h4>
<p>If the former, fix them in the same <em>commit</em> so there's never a commit that produces the lints.</p>



<a name="177441119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Should%20clippy%20lints%20be%20fixed%20in%20a%20separate%20PR%3F/near/177441119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Should.20clippy.20lints.20be.20fixed.20in.20a.20separate.20PR.3F.html#177441119">(Oct 06 2019 at 02:38)</a>:</h4>
<p>If the latter, separate PR.</p>



<a name="177521429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Should%20clippy%20lints%20be%20fixed%20in%20a%20separate%20PR%3F/near/177521429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Should.20clippy.20lints.20be.20fixed.20in.20a.20separate.20PR.3F.html#177521429">(Oct 07 2019 at 13:57)</a>:</h4>
<p>While I personally prefer separate PR, I know that's not universally accepted. I'd put such fixes in a separate <strong>commit</strong> if nothing else.</p>



<a name="177544940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Should%20clippy%20lints%20be%20fixed%20in%20a%20separate%20PR%3F/near/177544940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Should.20clippy.20lints.20be.20fixed.20in.20a.20separate.20PR.3F.html#177544940">(Oct 07 2019 at 18:11)</a>:</h4>
<p>Yes, <em>definitely</em> in a separate commit.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>